#Figure 3: Number of Rights and First Dimension
rm(list = ls())
points <- read.csv("all_colonies_1d_ideal_points.csv")

a <- round(cor(points$Rights.Provisions, points$d1), 2)

plot(points$Rights.Provisions, points$d1, type="n", ylab="Characteristic Score", 
     xlab="Number of Rights Provisions in Constitution", xlim = c(0, 30), axes = F, 
     main = "Constitution Characteristic Score and Number of Enumerated Rights")
text(points$Rights.Provisions[points$Charter == 0], points$d1[points$Charter == 0], labels=points$Label[points$Charter == 0], cex=0.6)
text(points$Rights.Provisions[points$Charter == 1], points$d1[points$Charter == 1], labels=points$Label[points$Charter == 1], cex=0.6, font=4)
text(22, -0.35, paste("Cor =", a), cex = 1.2)
axis(1, at = seq(0, 30, 2), cex.axis = .8)
axis(2, at = seq(-.5, .2, .1), las = 2)